import requests


class IhrmEmpManage:
    def add_emp(self, req_header, req_json):
        return requests.post(url="http://ihrm2-test.itheima.net/api/sys/user",
                             headers=req_header, json=req_json)

    def modify_emp(self, emp_id, req_header, req_json):
        return requests.put(url="http://ihrm2-test.itheima.net/api/sys/user/" + emp_id,
                            headers=req_header, json=req_json)

    def query_emp(self, emp_id, req_header, req_json):
        return requests.get(url="http://ihrm2-test.itheima.net/api/sys/user/" + emp_id,
                            headers=req_header, json=req_json)

    def delete_emp(self, emp_id, req_header, req_json):
        return requests.delete(url="http://ihrm2-test.itheima.net/api/sys/user/" + emp_id,
                               headers=req_header, json=req_json)


if __name__ == '__main__':
    pass
